* { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Inter', sans-serif; background: var(--bg, #FAF6F0); color: var(--t, #2C1810); min-height: 100vh; display: flex; }

        /* --- SIDEBAR --- */
        .sidebar { width: 260px; min-height: 100vh; background: var(--s, #FFFFFF); border-right: 1px solid var(--b, #E8DED0); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; z-index: 100; }
        .sidebar-brand { padding: 24px 20px; border-bottom: 1px solid var(--b, #E8DED0); display: flex; align-items: center; gap: 12px; }
        .brand-icon { width: 40px; height: 40px; background: linear-gradient(135deg, #667eea, #764ba2); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3em; flex-shrink: 0; }
        .brand-text h2 { font-size: 1em; font-weight: 700; color: var(--t, #2C1810); }
        .brand-text span { font-size: 0.7em; color: #484f58; font-weight: 500; }
        .nav-group { padding: 16px 12px 8px; }
        .nav-group-label { font-size: 0.65em; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #484f58; padding: 0 12px; margin-bottom: 8px; }
        .nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 8px; color: var(--m, #6B5B4F); text-decoration: none; font-size: 0.88em; font-weight: 500; transition: all 0.2s; margin-bottom: 2px; cursor: pointer; position: relative; }
        .nav-item:hover { background: var(--bg, #FAF6F0); color: var(--t, #2C1810); }
        .nav-item.active { background: linear-gradient(135deg, rgba(102,126,234,0.15), rgba(118,75,162,0.1)); color: #a78bfa; font-weight: 600; }
        .nav-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; background: linear-gradient(180deg, #667eea, #764ba2); border-radius: 0 3px 3px 0; }
        .nav-icon { font-size: 1.1em; width: 22px; text-align: center; flex-shrink: 0; }
        .nav-badge { margin-left: auto; font-size: 0.7em; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
        .badge-live { background: rgba(76,175,80,0.15); color: #4caf50; border: 1px solid rgba(76,175,80,0.25); }
        .badge-new { background: rgba(102,126,234,0.15); color: #667eea; border: 1px solid rgba(102,126,234,0.25); }
        .badge-beta { background: rgba(255,152,0,0.15); color: #ff9800; border: 1px solid rgba(255,152,0,0.25); }
        .badge-count { background: rgba(88,166,255,0.15); color: var(--gold, #B8860B); border: 1px solid rgba(88,166,255,0.2); }
        .sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid var(--b, #E8DED0); }
        .version-info { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg, #FAF6F0); border-radius: 8px; border: 1px solid var(--b, #E8DED0); }
        .version-dot { width: 8px; height: 8px; border-radius: 50%; background: #56d364; box-shadow: 0 0 8px rgba(86,211,100,0.4); }
        .version-text { font-size: 0.75em; color: var(--m, #6B5B4F); }

        /* --- MAIN --- */
        .main { margin-left: 260px; flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
        .topbar { padding: 24px 32px; border-bottom: 1px solid var(--b, #E8DED0); display: flex; justify-content: space-between; align-items: center; }
        .topbar h1 { font-size: 1.5em; font-weight: 800; color: var(--t, #2C1810); }
        .topbar p { font-size: 0.85em; color: #484f58; margin-top: 2px; }
        .content { padding: 24px 32px; flex: 1; }

        /* --- BUTTONS --- */
        .btn { padding: 8px 16px; border-radius: 8px; font-size: 0.82em; font-weight: 600; border: 1px solid var(--b, #E8DED0); background: var(--bg, #FAF6F0); color: var(--t, #2C1810); cursor: pointer; transition: all 0.2s; }
        .btn:hover { background: var(--b, #E8DED0); border-color: var(--b, #E8DED0); }
        .btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); border: none; color: #fff; }
        .btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

        /* --- FILTERS --- */
        .filter-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
        .filter-chip { padding: 6px 14px; border-radius: 20px; font-size: 0.78em; font-weight: 600; border: 1px solid var(--b, #E8DED0); background: transparent; color: var(--m, #6B5B4F); cursor: pointer; transition: all 0.2s; }
        .filter-chip:hover { background: var(--bg, #FAF6F0); color: var(--t, #2C1810); }
        .filter-chip.active { background: rgba(102,126,234,0.15); color: #a78bfa; border-color: rgba(102,126,234,0.3); }

        /* --- NOTES --- */
        .notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 14px; }
        .note-card { background: var(--s, #FFFFFF); border: 1px solid var(--b, #E8DED0); border-radius: 12px; padding: 18px; transition: all 0.25s; border-top: 3px solid var(--nc, var(--gold, #B8860B)); }
        .note-card:hover { border-color: var(--b, #E8DED0); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
        .note-card.pinned { border-color: rgba(227,179,65,0.3); border-top-color: #e3b341; }
        .note-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
        .note-cat { font-size: 0.65em; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; border-radius: 4px; background: rgba(88,166,255,0.1); color: var(--gold, #B8860B); }
        .note-title { font-size: 0.95em; font-weight: 700; color: var(--t, #2C1810); margin-bottom: 6px; }
        .note-body { font-size: 0.83em; color: var(--m, #6B5B4F); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
        .note-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--b, #E8DED0); }
        .note-time { font-size: 0.7em; color: #484f58; }
        .note-actions { display: flex; gap: 4px; }
        .note-act-btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--b, #E8DED0); background: transparent; color: #484f58; font-size: 0.78em; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
        .note-act-btn:hover { background: var(--bg, #FAF6F0); color: var(--t, #2C1810); border-color: var(--b, #E8DED0); }
        .note-act-btn.pin-active { color: #e3b341; border-color: rgba(227,179,65,0.3); }

        /* --- MODAL --- */
        .modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 200; align-items: center; justify-content: center; }
        .modal-overlay.show { display: flex; }
        .modal { background: var(--bg, #FAF6F0); border: 1px solid var(--b, #E8DED0); border-radius: 16px; width: 500px; max-width: 90vw; max-height: 85vh; overflow-y: auto; }
        .modal-head { padding: 20px 24px; border-bottom: 1px solid var(--b, #E8DED0); display: flex; justify-content: space-between; align-items: center; }
        .modal-head h3 { font-size: 1em; font-weight: 700; color: var(--t, #2C1810); }
        .modal-close { width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent; color: #484f58; font-size: 1.2em; cursor: pointer; display: flex; align-items: center; justify-content: center; }
        .modal-close:hover { background: var(--s, #FFFFFF); color: var(--red, #DC2626); }
        .modal-body { padding: 20px 24px; }
        .modal-foot { padding: 16px 24px; border-top: 1px solid var(--b, #E8DED0); display: flex; justify-content: flex-end; gap: 10px; }
        .form-group { margin-bottom: 14px; }
        .form-label { font-size: 0.78em; font-weight: 600; color: var(--m, #6B5B4F); margin-bottom: 6px; display: block; }
        .form-input, .form-select, .form-textarea { width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--b, #E8DED0); background: var(--s, #FFFFFF); color: var(--t, #2C1810); font-size: 0.88em; font-family: inherit; transition: border-color 0.2s; }
        .form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: #667eea; }
        .form-textarea { min-height: 120px; resize: vertical; }
        .form-select { cursor: pointer; }
        .form-select option { background: var(--bg, #FAF6F0); }

        .color-dots { display: flex; gap: 8px; }
        .color-dot { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: all 0.2s; }
        .color-dot:hover { transform: scale(1.15); }
        .color-dot.active { border-color: var(--t, #2C1810); box-shadow: 0 0 10px rgba(255,255,255,0.2); }

        .empty-state { text-align: center; padding: 60px 20px; color: #484f58; }
        .empty-state .empty-icon { font-size: 3em; margin-bottom: 12px; opacity: 0.5; }
        .header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .header-row h2 { font-size: 1.2em; font-weight: 700; color: var(--t, #2C1810); }

        /* --- USAGE GUIDE --- */
        .guide { margin-top: 40px; border-top: 1px solid var(--b, #E8DED0); padding-top: 20px; }
        .guide-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; color: #484f58; font-size: 0.82em; font-weight: 600; background: none; border: none; padding: 6px 0; transition: color 0.2s; }
        .guide-toggle:hover { color: var(--m, #6B5B4F); }
        .guide-toggle .arrow { transition: transform 0.2s; display: inline-block; }
        .guide-toggle.open .arrow { transform: rotate(90deg); }
        .guide-body { display: none; margin-top: 14px; padding: 20px; background: var(--s, #FFFFFF); border: 1px solid var(--b, #E8DED0); border-radius: 12px; }
        .guide-body.show { display: block; }
        .guide-body h4 { font-size: 0.85em; font-weight: 700; color: var(--t, #2C1810); margin: 0 0 10px; }
        .guide-body table { width: 100%; border-collapse: collapse; font-size: 0.8em; }
        .guide-body th { text-align: left; padding: 8px 10px; color: var(--m, #6B5B4F); font-weight: 600; border-bottom: 1px solid var(--b, #E8DED0); }
        .guide-body td { padding: 8px 10px; color: var(--t, #2C1810); border-bottom: 1px solid rgba(27,32,48,0.5); }
        .guide-body tr:last-child td { border-bottom: none; }
        .guide-tip { margin-top: 14px; padding: 10px 14px; background: rgba(102,126,234,0.08); border: 1px solid rgba(102,126,234,0.15); border-radius: 8px; font-size: 0.78em; color: var(--m, #6B5B4F); line-height: 1.6; }
        .guide-tip strong { color: #a78bfa; }

        @media (max-width: 1024px) {
            .sidebar { width: 64px; }
            .sidebar .brand-text, .sidebar .nav-group-label, .sidebar .nav-item span, .sidebar .nav-badge, .sidebar-footer .version-text { display: none; }
            .main { margin-left: 64px; }
        }