*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--bg: #0f172a;--bg-surface: #1e293b;--bg-hover: #334155;--text: #e2e8f0;--text-muted: #94a3b8;--accent: #3b82f6;--accent-hover: #2563eb;--danger: #ef4444;--border: #334155;--radius: 8px}html,body,#root{height:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);line-height:1.5}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}code,.mono{font-family:SF Mono,Fira Code,monospace;font-size:.85em;word-break:break-all}button{background:var(--accent);color:#fff;border:none;padding:.5rem 1rem;border-radius:var(--radius);cursor:pointer;font-size:.875rem;transition:background .15s}button:hover:not(:disabled){background:var(--accent-hover)}button:disabled{opacity:.5;cursor:not-allowed}.btn-danger{background:var(--danger)}.btn-danger:hover:not(:disabled){background:#dc2626}.btn-small{padding:.25rem .5rem;font-size:.75rem}.btn-tiny{padding:.125rem .375rem;font-size:.7rem;background:var(--bg-hover)}.btn-new{width:100%;margin-bottom:.5rem}input,textarea{background:var(--bg);color:var(--text);border:1px solid var(--border);padding:.5rem .75rem;border-radius:var(--radius);font-size:.875rem;width:100%;outline:none}input:focus,textarea:focus{border-color:var(--accent)}textarea{resize:vertical;min-height:2.5rem}.loading-screen{display:flex;align-items:center;justify-content:center;height:100%}.app-layout{display:flex;height:100%}.main-content{flex:1;overflow-y:auto;display:flex;flex-direction:column}.auth-page{display:flex;align-items:center;justify-content:center;height:100%}.auth-card{background:var(--bg-surface);padding:2rem;border-radius:12px;width:100%;max-width:400px}.auth-card h1{font-size:1.5rem;margin-bottom:.25rem}.auth-card h2{font-size:1.1rem;color:var(--text-muted);margin-bottom:1.5rem}.auth-card form{display:flex;flex-direction:column;gap:.75rem}.auth-card form button{margin-top:.5rem}.auth-card p{margin-top:1rem;font-size:.85rem;color:var(--text-muted)}.auth-card .info{font-style:italic}.error{color:var(--danger);font-size:.85rem;margin-top:.5rem}.warning{color:#f59e0b;font-size:.85rem}.room-sidebar{width:240px;min-width:240px;background:var(--bg-surface);border-right:1px solid var(--border);display:flex;flex-direction:column;height:100%}.sidebar-header{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:1px solid var(--border)}.sidebar-header h2{font-size:1rem}.sidebar-actions{display:flex;gap:.25rem}.sidebar-form{padding:.5rem 1rem;display:flex;gap:.5rem;border-bottom:1px solid var(--border)}.sidebar-form input{flex:1}.room-list{flex:1;overflow-y:auto;padding:.5rem 0}.room-item{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;cursor:pointer;transition:background .1s}.room-item:hover{background:var(--bg-hover)}.room-item.active{background:var(--bg-hover);border-left:3px solid var(--accent)}.room-name{font-size:.9rem;flex:1}.invite-popup{padding:.75rem 1rem;background:var(--bg);border-top:1px solid var(--border);font-size:.8rem}.invite-popup code{display:block;padding:.25rem;background:var(--bg-surface);margin:.25rem 0;word-break:break-all}.sidebar-nav{border-top:1px solid var(--border);padding:.5rem;display:flex;flex-direction:column;gap:.25rem}.sidebar-nav button{background:transparent;text-align:left;color:var(--text-muted);padding:.5rem .75rem;border-radius:var(--radius)}.sidebar-nav button:hover{background:var(--bg-hover);color:var(--text)}.sidebar-nav button.active{color:var(--accent);background:var(--bg-hover)}.chat-page{display:flex;flex:1;height:100%}.chat-main{flex:1;display:flex;flex-direction:column;min-width:0}.chat-sidebar-right{width:280px;min-width:280px;border-left:1px solid var(--border);padding:1rem;overflow-y:auto}.chat-sidebar-right h3{margin-bottom:.75rem;font-size:.95rem}.chat-empty,.page-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--text-muted)}.message-list{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.message-list.loading{align-items:center;justify-content:center}.message-list .empty{color:var(--text-muted);text-align:center;margin-top:2rem}.message{display:flex;flex-direction:column;background:var(--bg-surface);padding:.5rem .75rem;border-radius:var(--radius);max-width:80%}.message.own{align-self:flex-end;background:#1e3a5f}.message .sender{font-size:.75rem;color:var(--accent);font-weight:600}.message .text{font-size:.9rem;word-break:break-word;margin:.125rem 0}.message .time{font-size:.7rem;color:var(--text-muted);align-self:flex-end}.message-input{display:flex;gap:.5rem;padding:.75rem 1rem;border-top:1px solid var(--border);background:var(--bg-surface)}.message-input textarea{flex:1;resize:none;max-height:120px}.file-upload{margin-bottom:1rem}.file-upload input[type=file]{margin-bottom:.5rem}.progress-bar{height:20px;background:var(--bg);border-radius:var(--radius);overflow:hidden;position:relative;margin-top:.5rem}.progress-fill{height:100%;background:var(--accent);transition:width .2s}.progress-bar span{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.7rem;font-weight:600}.file-list{display:flex;flex-direction:column;gap:.5rem}.file-item{display:flex;align-items:center;justify-content:space-between;background:var(--bg);padding:.5rem .75rem;border-radius:var(--radius)}.file-info{display:flex;flex-direction:column;min-width:0}.file-name{font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-size{font-size:.7rem;color:var(--text-muted)}.file-item button{flex-shrink:0}.notes-page{padding:1.5rem;height:100%;display:flex;flex-direction:column}.notes-page h2{margin-bottom:.25rem}.notes-page .subtitle{color:var(--text-muted);font-size:.85rem;margin-bottom:1rem}.note-editor{display:flex;flex:1;gap:1rem;min-height:0}.note-sidebar{width:200px;min-width:200px;display:flex;flex-direction:column}.note-list{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:.25rem}.note-item{padding:.5rem .75rem;background:var(--bg-surface);border-radius:var(--radius);cursor:pointer;font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.note-item:hover{background:var(--bg-hover)}.note-item.active{background:var(--bg-hover);border-left:3px solid var(--accent)}.note-content{flex:1;display:flex;flex-direction:column;gap:.5rem}.note-title-input{font-size:1.1rem;font-weight:600}.note-body-input{flex:1;min-height:200px;font-family:inherit}.note-actions{display:flex;gap:.5rem}.settings-page{padding:1.5rem;max-width:700px}.settings-page h2{margin-bottom:1rem}.settings-section{margin-bottom:2rem}.settings-section h3{margin-bottom:.5rem}.settings-section p{font-size:.9rem;margin-bottom:.5rem}.key-backup h3{margin-top:1rem}.key-backup p{font-size:.85rem;color:var(--text-muted);margin-bottom:.5rem}.form-row{display:flex;gap:.5rem;margin-bottom:.75rem;flex-wrap:wrap}.form-row input{flex:1;min-width:200px}.status{font-size:.85rem;color:var(--accent);margin-top:.5rem}.empty{color:var(--text-muted);font-size:.85rem;text-align:center;padding:1rem}.modal-overlay{position:fixed;inset:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:100}.modal-content{background:var(--bg-surface);border-radius:12px;padding:1.5rem;width:100%;max-width:460px;box-shadow:0 8px 32px #0006}.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.modal-header h3{font-size:1.1rem;margin:0}.modal-body{display:flex;flex-direction:column;gap:.75rem}.modal-body .text-muted{color:var(--text-muted);font-size:.85rem}.invite-url-field{display:flex;gap:.5rem;align-items:center}.invite-url-field input{flex:1;font-family:SF Mono,Fira Code,monospace;font-size:.8rem}@media (max-width: 768px){.app-layout{flex-direction:column}.room-sidebar{width:100%;min-width:100%;height:auto;max-height:200px;border-right:none;border-bottom:1px solid var(--border)}.chat-page{flex-direction:column}.chat-sidebar-right{width:100%;min-width:100%;border-left:none;border-top:1px solid var(--border)}.note-editor{flex-direction:column}.note-sidebar{width:100%;min-width:100%}}
