*{margin:0;padding:0;box-sizing:border-box}:root{--bg: #ffffff;--bg-secondary: #f7f8fa;--surface: #ffffff;--surface-hover: #f0f1f3;--border: #e2e4e8;--border-light: #eef0f2;--text: #1a1a2e;--text-secondary: #555770;--text-muted: #8b8da3;--accent: #4361ee;--accent-hover: #3651d4;--accent-light: #eef1ff;--danger: #e63946;--danger-light: #fef2f2;--success: #2ec4b6;--sidebar-width: 280px;--header-height: 56px}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Inter,Roboto,sans-serif;background:var(--bg);color:var(--text);line-height:1.6;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}.app-layout{display:flex;height:100vh;overflow:hidden}.sidebar{width:var(--sidebar-width);height:100vh;background:var(--bg-secondary);border-right:1px solid var(--border);display:flex;flex-direction:column;flex-shrink:0;transition:transform .25s ease,width .25s ease;z-index:100}.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 12px;border-bottom:1px solid var(--border-light)}.sidebar-logo{font-size:18px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:8px}.logo-icon{font-size:22px}.sidebar-close-btn{display:none;background:none;border:none;color:var(--text-muted);cursor:pointer;padding:4px;border-radius:6px}.sidebar-close-btn:hover{background:var(--surface-hover);color:var(--text)}.sidebar-actions{padding:12px 16px}.btn-new-note{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;font-size:14px}.sidebar-search{padding:0 16px 12px}.search-input{width:100%;padding:8px 12px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-size:13px;outline:none;transition:border-color .15s}.search-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}.search-input::placeholder{color:var(--text-muted)}.sidebar-tree{flex:1;overflow-y:auto;padding:4px 8px 16px}.sidebar-loading,.sidebar-empty{padding:24px 16px;text-align:center;color:var(--text-muted);font-size:13px}.tree-group{margin-bottom:4px}.tree-group-header{display:flex;align-items:center;gap:6px;width:100%;padding:6px 8px;background:none;border:none;border-radius:6px;color:var(--text-secondary);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;cursor:pointer;transition:background .1s}.tree-group-header:hover{background:var(--surface-hover)}.tree-chevron{transition:transform .2s;flex-shrink:0}.tree-chevron.expanded{transform:rotate(90deg)}.tree-group-label{flex:1;text-align:left}.tree-group-count{font-size:11px;color:var(--text-muted);background:var(--border-light);padding:1px 7px;border-radius:10px;font-weight:500}.tree-items{list-style:none;padding:2px 0 2px 8px}.tree-item{display:flex;align-items:center;border-radius:6px;transition:background .1s;position:relative}.tree-item:hover{background:var(--surface-hover)}.tree-item.active{background:var(--accent-light)}.tree-item.active .tree-item-btn{color:var(--accent);font-weight:500}.tree-item-btn{flex:1;display:flex;align-items:center;gap:8px;padding:7px 8px;background:none;border:none;color:var(--text);font-size:13px;cursor:pointer;text-align:left;min-width:0}.tree-item-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tree-item-delete{opacity:0;background:none;border:none;color:var(--text-muted);cursor:pointer;padding:4px 8px;border-radius:4px;flex-shrink:0;transition:all .1s}.tree-item:hover .tree-item-delete{opacity:1}.tree-item-delete:hover{color:var(--danger);background:var(--danger-light)}.sidebar-overlay{display:none}.main-content{flex:1;display:flex;flex-direction:column;min-width:0;overflow:hidden}.hamburger-btn{display:none;position:fixed;top:12px;left:12px;z-index:50;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:8px;cursor:pointer;color:var(--text);box-shadow:0 1px 3px #00000014}.hamburger-btn:hover{background:var(--surface-hover)}.empty-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px;color:var(--text-secondary)}.empty-state-icon{font-size:64px;margin-bottom:16px}.empty-state h2{font-size:20px;font-weight:600;color:var(--text);margin-bottom:8px}.empty-state p{font-size:14px;color:var(--text-muted);margin-bottom:24px}.btn{padding:8px 20px;border:none;border-radius:8px;cursor:pointer;font-size:14px;font-weight:500;transition:all .15s}.btn-primary{background:var(--accent);color:#fff}.btn-primary:hover{background:var(--accent-hover)}.btn-primary:disabled{opacity:.5;cursor:not-allowed}.editor-page{flex:1;display:flex;flex-direction:column;overflow:hidden}.editor-header{display:flex;justify-content:flex-end;align-items:center;padding:12px 24px;border-bottom:1px solid var(--border-light);background:var(--surface);flex-shrink:0}.editor-actions{display:flex;align-items:center;gap:12px}.save-indicator{font-size:12px;color:var(--text-muted)}.save-indicator.saved{color:var(--success)}.btn-save{padding:6px 20px;font-size:13px}.editor-container{flex:1;overflow-y:auto;padding:32px 48px;width:100%}.note-title-input{width:100%;background:none;border:none;font-size:32px;font-weight:700;color:var(--text);outline:none;margin-bottom:24px;padding:0}.note-title-input::placeholder{color:var(--text-muted)}.editor-js-container{min-height:400px}.codex-editor__redactor{padding-bottom:200px!important}.ce-block__content,.ce-toolbar__content{max-width:100%!important;margin:0}.ce-toolbar__actions{right:0;position:absolute}.ce-toolbar__plus{color:var(--accent);background:var(--accent-light);border:1px solid var(--accent);border-radius:6px;width:34px;height:34px;opacity:1}.ce-toolbar__plus:hover{background:var(--accent);color:#fff}.ce-toolbar__settings-btn{color:var(--text-muted);background:var(--surface);border:1px solid var(--border);border-radius:6px;width:34px;height:34px}.ce-toolbar__settings-btn:hover{background:var(--surface-hover);color:var(--text)}.ce-toolbar{z-index:3}.ce-popover{border:1px solid var(--border);box-shadow:0 4px 16px #00000014;border-radius:10px}.ce-popover-item__icon{background:var(--bg-secondary);border:1px solid var(--border-light);border-radius:6px}.ce-popover-item:hover{background:var(--accent-light)}.ce-inline-toolbar{border:1px solid var(--border);box-shadow:0 2px 8px #0000000f;border-radius:8px}.ce-conversion-toolbar{border:1px solid var(--border);box-shadow:0 2px 8px #0000000f}.ce-settings{border:1px solid var(--border);box-shadow:0 4px 16px #00000014;border-radius:10px}.cdx-marker{background:#ffde4566;padding:2px 4px}.ce-code__textarea{background:var(--bg-secondary);color:var(--text);border:1px solid var(--border);border-radius:8px;font-family:SF Mono,Fira Code,monospace}.cdx-input{border-color:var(--border)}.cdx-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light)}.tc-table,.tc-row,.tc-cell{border-color:var(--border)}.cdx-quote__text{border-left:3px solid var(--accent);padding-left:16px;color:var(--text-secondary)}::-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)}@media (max-width: 768px){.sidebar{position:fixed;top:0;left:0;height:100vh;width:300px;transform:translate(-100%);box-shadow:none;z-index:200}.sidebar.open{transform:translate(0);box-shadow:4px 0 24px #0000001f}.sidebar-close-btn{display:flex}.sidebar-overlay{display:block;position:fixed;top:0;right:0;bottom:0;left:0;background:#0000004d;z-index:150}.hamburger-btn{display:flex}.main-content{width:100%}.editor-header{padding:12px 16px 12px 56px}.editor-container{padding:16px 12px}.note-title-input{font-size:24px}.empty-state{padding:80px 20px 40px}}@media (min-width: 769px) and (max-width: 1024px){:root{--sidebar-width: 240px}}
